<?php

namespace app\admin\model;

use app\common\model\TimeModel;

class Orders extends TimeModel
{

    protected $name = "orders";

    public function getTypeList()
    {
        return ['0'=>'定制','1'=>'现有',];
    }

    public function getProjectStatusList()
    {
        return ['0'=>'首次对接','1'=>'二次跟踪','2'=>'多次跟踪','3'=>'已交易',];
    }

    public function getStateList()
    {
        return ['0'=>'进行中','1'=>'已完成','2'=>'已结算'];
    }

    public function getUsersList()
    {
        return Users::column('true_name', 'uid');
    }

    public function getRatioTimeAttr($value)
    {
        if (empty($value))
            return '无';
        return date('Y-m-d H:i:s', $value);
    }

}